package common

func NewPageRequest() *PageRequest {
	return &PageRequest{
		PageNumber: 1,
		PageSize:   10,
	}
}

type PageRequest struct {
	PageNumber int `json:"page_number,omitempty"`
	PageSize   int `json:"page_size,omitempty"`
}

func (p *PageRequest) Offset() int {
	return (p.PageNumber - 1) * p.PageSize
}


